package com.bdjk.bdmw.InfoGath.business.iparent.model;


import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.bdjk.bdmw.InfoGath.business.iparent.vo.IparentPositionVO;
import com.bdjk.bdmw.InfoGath.common.constants.InfoGathConstants;
import com.bdjk.bdmw.InfoGath.common.model.BaseModel;
import com.bdjk.bdmw.InfoGath.common.model.LBSModel;

public class IparentPositionModel extends BaseModel implements Serializable {

	private static final long serialVersionUID = 509048313868603878L;
    private String id;
	// 协议版本号
	private String version;
	// 加密方式
	private String encryptType;
	// 包校验值
	private String validatCode;
	// 发送时间
	private Date sendTime;
	// 终端类型
	private String terType;
	// 设备号
	private String terIdent;
	// 时区
	private String timeZone;
	// 报文类型
	private String mesType;
	//数据类型
	private String dataType;
	// 经度
	private Double longitude;
	// 纬度
	private Double latitude;
	// 速度
	private Double speed;
	// 方向
	private Double direction;
	// 高度
	private Double altitude;
	// 采集时间
	private Date collectMills;
	//模型
	private List<LBSModel> lbsModels;
	//基站信息
	private String baseInfo;
	
    
	

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getEncryptType() {
		return encryptType;
	}

	public void setEncryptType(String encryptType) {
		this.encryptType = encryptType;
	}

	public String getValidatCode() {
		return validatCode;
	}
               
    public void setValidatCode(String validatCode) {
		this.validatCode = validatCode;
	}

	public Date getSendTime() {
		return sendTime;
	}

	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}

	public String getTerType() {
		return terType;
	}

	public void setTerType(String terType) {
		this.terType = terType;
	}

	public String getTerIdent() {
		return terIdent;
	}


	public void setTerIdent(String terIdent) {
		this.terIdent = terIdent;
	}

	public String getTimeZone() {
		return timeZone;
	}

	public void setTimeZone(String timeZone) {
		this.timeZone = timeZone;
	}

	public String getMesType() {
		return mesType;
	}

	public void setMesType(String mesType) {
		this.mesType = mesType;
	}

	public String getDataType() {
		return dataType;
	}

	public void setDataType(String dataType) {
		this.dataType = dataType;
	}

	public Double getLongitude() {
		return longitude;
	}

	public void setLongitude(Double longitude) {
		this.longitude = longitude;
	}

	public Double getLatitude() {
		return latitude;
	}

	public void setLatitude(Double latitude) {
		this.latitude = latitude;
	}

	public Double getSpeed() {
		return speed;
	}

	public void setSpeed(Double speed) {
		this.speed = speed;
	}

	public Double getDirection() {
		return direction;
	}

	public void setDirection(Double direction) {
		this.direction = direction;
	}

	public Double getAltitude() {
		return altitude;
	}

	public void setAltitude(Double altitude) {
		this.altitude = altitude;
	}

	public Date getCollectMills() {
		return collectMills;
	}

	public void setCollectMills(Date collectTime) {
		this.collectMills = collectTime;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
	

	public List<LBSModel> getLbsModels() {
		return lbsModels;
	}

	public void setLbsModels(List<LBSModel> lbsModels) {
		this.lbsModels = lbsModels;
	}

	public String getBaseInfo() {
		return baseInfo;
	}

	public void setBaseInfo(String baseInfo) {
		this.baseInfo = baseInfo;
	}

	public IparentPositionVO model2VO() {
		IparentPositionVO vo = new IparentPositionVO();
		vo.setVersion(this.version);
		vo.setEncryptType(this.encryptType);
		vo.setValidatCode(this.validatCode);
	    if(null!=this.sendTime){
	    	vo.setSendTime(InfoGathConstants.SDF.format(this.sendTime));
	    }
	    vo.setTerType(this.terType);
	    vo.setTerIdent(this.terIdent);
	    vo.setTimeZone(this.timeZone);
	    vo.setMesType(this.mesType);
	    vo.setDataType(this.dataType);
	    vo.setLongitude(String.valueOf(this.longitude));
	    vo.setLatitude(String.valueOf(this.latitude));
		vo.setAltitude(String.valueOf(this.altitude));
		vo.setSpeed(String.valueOf(this.speed));
		vo.setDirection(String.valueOf(this.direction));
		if(null!=this.collectMills){
			vo.setCollectMills(InfoGathConstants.SDF.format(this.collectMills));
		}
		//vo.setCollectMills(this.collectMills);
		
		return vo;
	}

	

}

